Function GetC1Env(num)
	Dim C1Env(19)
	C1Env(0)="xxxxx"  
	C1Env(1)="xxxxx"  
	C1Env(2)="xxxxx"
	GetC1Env= C1Env(num-1)
End Function
Function GetUserDetails()
	ReDim Preserve UserDetail(3)
	MyString = inputbox ("Please enter user detail as follow:   ID;Firstname;Lastname;Email","Enter user detail")
	MyString = UCase(Trim(MyString))
	If IsEmpty(MyString) Then Wscript.Quit
	UserDetail(0) = Split(MyString, ";", -1, 1)(0)
	UserDetail(1) = Split(MyString, ";", -1, 1)(1)
	UserDetail(2) = Split(MyString, ";", -1, 1)(2)
	UserDetail(3) = Split(MyString, ";", -1, 1)(3)
	ReDim Preserve UserDetail(9)
	UserDetail(4) = "xxx"
	UserDetail(5) =  "200"
	UserDetail(6) = "xxx"
	UserDetail(7) = "50"
	UserDetail(8) = "100"
	UserDetail(9) = "ENG"
	UserIDDetail = Split("USER_ID;FIRST_NAME;LAST_NAME;EMAILID;DISP_PROF_CD;DASHBOARD_WIDTH;HOME_NAV_OPT_CD;TD_ENTRY_AGE_DAYS1;TD_ENTRY_AGE_DAYS2;LANGUAGE_CD", ";", -1, 1)
End Function
Function GetRequestDetails()
	ReDim Preserve UserDetail(4)
	MyString = inputbox ("Please select C1Env;EndUserID;ModelID;PortalID;OnlySales?(y/n): " & vbCrLf & vbCrLf &"1.PROD    6.FC1  11.SIT2C  16.TRNM" & vbCrLf &"2.BET1    7.FC2  12.ST2    17.UAT1" & vbCrLf & "3.CAR     8.FC4  13.ST3    18.UATA" & vbCrLf & "4.CCBPRE1 9.M2C  14.TRN1   19.ST5U " & vbCrLf & "5.CCBPS1 10.SIT1 15.TRN2   20.FC4"& vbCrLf,"Enter required details","1;MADVE;CHAOYUEW;CALLCNTR;n")
	If IsEmpty(MyString) Then Wscript.Quit
	MyString=UCase(Trim(MyString))
	UserDetail(0) = Split(MyString, ";", -1, 1)(0)
	UserDetail(1) = Split(MyString, ";", -1, 1)(1)
	UserDetail(2) = Split(MyString, ";", -1, 1)(2)
	UserDetail(3) = Split(MyString, ";", -1, 1)(3)
	UserDetail(3) = Split(MyString, ";", -1, 1)(4)
End Function
Sub LogonEnv()
	dim cnt
	REM ie.navigate2 GetC1Env(num),2048
	if typename(ie) = "Empty" then
		Set ie =WScript.CreateObject("InternetExplorer.Application")
		ie.Visible=true
	end if
	if typename(C1URL) ="String" then
		ie.navigate C1URL
	else
		if IsEmpty(num) Then 
			num = UserDetail(0)
			ie.navigate GetC1Env(UserDetail(0))
		else
			ie.navigate GetC1Env(num) 
		end if
	end if
	if num = 1 or C1URL = "xxxxx" or C1URL ="xxxxx" then '<---------logon prod env'
		SetProdIE
		While ie.Busy Or ie.ReadyState <> 4
			WScript.Sleep 200 : cnt=cnt+1
			if cnt > 100 then 
				ie.quit : msgbox "IE loading too long,Please log manaualy to check this env status" : Wscript.quit
			end if
		wend
		on error resume next : ie.Document.getElementById("overridelink").click : on error goto 0
		Do While ie.Busy Or ie.ReadyState <> 4: WScript.Sleep 200: Loop
		Set inps = ie.Document.getElementsByTagName("input")
		If Not(inps Is Nothing) Then 
			for each item in inps
				if item.name = "username" then item.value = C1Name
				if item.name = "password" then item.value = C1Password
				if item.name = "login" then item.click
			next
		End If		
	else ''logon non-prod env'
		While ie.Busy Or ie.ReadyState <> 4
			WScript.Sleep 200 : cnt=cnt+1
			if cnt > 100 then 
				ie.quit : msgbox "IE loading too long,Please log manaualy to check this env status" : Wscript.quit
			end if
		wend
		Set username =ie.Document.getElementById("userId")
		If Not(username Is Nothing) Then 
			username.value= C1Name
			ie.Document.getElementById("password").value=C1Password
			ie.Document.getElementById("loginbutton").click
		End If
	end if
	Do While ie.Busy Or ie.ReadyState <> 4: WScript.Sleep 200: Loop
	'<---------------------Check web element to make sure page loads 100%'
	Set TabPageContent = nothing: Set srch_frameContent =nothing: Set dataframeContent =nothing: Set loadComplete = nothing
	on error resume next
	while TabPageContent Is Nothing
		WScript.Sleep 200
		Set TabPageContent = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow
	wend
	while srch_frameContent Is Nothing
		WScript.Sleep 200
		Set srch_frameContent = TabPageContent.document.getelementbyid("srch_frame").contentWindow
	wend
	while dataframeContent Is Nothing
		WScript.Sleep 200
		Set dataframeContent = srch_frameContent.document.getelementbyid("dataframe").contentWindow
	wend
	while loadComplete IS Nothing
		WScript.Sleep 200
		Set loadComplete = dataframeContent.document.getelementbyid("L_ENTITY_INFO")
	wend
	on error goto 0
end Sub
Sub SwitchMenu()
	'<--------------------------Open Menu to Admin page'
	Do While ie.Busy Or ie.ReadyState <> 4: WScript.Sleep 200: Loop
	on error resume next
	Set ChangeMenu = ie.document.frames(0).document.getelementbyid("IM_menuButton")
	dim cnt
	while ChangeMenu Is Nothing
		WScript.Sleep 200: 	Set ChangeMenu = ie.document.frames(0).document.getelementbyid("IM_menuButton") : cnt=cnt+1
		if cnt > 100 then 
			ie.quit : msgbox "IE loading too long,Please run again" : Wscript.quit
		end if
	wend	
	ChangeMenu.FireEvent("onclick") : WScript.Sleep 500 
	Set AdminMenu = ie.document.frames(0).document.getelementbyid("topMenuItem_1")
	AdminMenu.FireEvent("onmouseover") : AdminMenu.FireEvent("onclick") : WScript.Sleep 1000
	'<-------------------Choose User manager menu
	Set MenuList = ie.document.frames(0).document.getelementbyid("menubar")
	while MenuList Is Nothing
		ChangeMenu.FireEvent("onclick") : WScript.Sleep 500
		AdminMenu.FireEvent("onmouseover") : AdminMenu.FireEvent("onclick") : WScript.Sleep 1000
		Set MenuList = ie.document.frames(0).document.getelementbyid("menubar")
	wend
	Set SubMenuList = ie.document.frames(0).document.getelementbyid("submenu")
	Set MenuListContent = MenuList.contentWindow
	Set SubMenuListContent = SubMenuList.contentWindow
	Set Umenu = MenuListContent.document.getelementbyid("sideMenuItem19x0")
	while Umenu is nothing
		WScript.Sleep 200
		Set Umenu = MenuListContent.document.getelementbyid("sideMenuItem19x0")
	wend
	Umenu.FireEvent("onmouseover") : WScript.Sleep 1000	
	if isempty(toBeRevokedGroup) then
		toBeFoundID = "subMenuItem3x1"
	else
		toBeFoundID = "subMenuItem4x1"
	end if	
	Set UserAdd = SubMenuListContent.document.getelementbyid(toBeFoundID)
	while UserAdd is nothing
		WScript.Sleep 200
		Set UserAdd = SubMenuListContent.document.getelementbyid(toBeFoundID)
	wend
	UserAdd.FireEvent("onmouseover") : UserAdd.FireEvent("onclick")
	Do While ie.Busy Or ie.ReadyState <> 4: WScript.Sleep 200: Loop
	Set temp = ie.document.frames(0).document.getelementbyid("tabPage")
	while temp is nothing
		WScript.Sleep 200
		Set temp = ie.document.frames(0).document.getelementbyid("tabPage")
	wend
	if typename(toBeRevokedGroup) ="String" then
		Set TabMenuContent = ie.document.frames(0).document.getelementbyid("tabMenu").contentWindow
		Set TDList = TabMenuContent.document.getelementsbytagname("td")
		while TDList is nothing
			WScript.Sleep 200
			Set TDList = TabMenuContent.document.getelementsbytagname("td")
		wend
		SwitchTab("Users")
	end if
	on error goto 0
end Sub
Sub SwitchTab(value)
	For each item in TDList
		If item.InnerHTML = value Then 
			item.click
		Exit For
		End If
	Next
	WScript.Sleep 2000
end Sub
Sub EnterUserID(userid)
	dim toBeSearchedID,searchButton
	
	if isempty (toBeRevokedGroup) then
		toBeSearchedID = "USER_ID" : searchButton = "IM_mainSrch_userMnSrch"
	else
		toBeSearchedID = "USR_GRP_ID" : searchButton = "IM_criteria_usrGrpSrch"
	end if
	on error resume next
	do
		WScript.Sleep 200 : Set uservalue =nothing
		Set tempwins=createobject("shell.application") : Set winsWindows = tempwins.Windows
		For Each WebBrowser In winsWindows
			If WebBrowser.visible =true then
				If Instr(WebBrowser.LocationURL,winstr) =1 Then
					while uservalue Is Nothing
						Wscript.Sleep 1000 : Set uservalue = WebBrowser.document.getelementbyid(toBeSearchedID)
					wend
					while uservalue.value <> userid
						WScript.Sleep 200 : uservalue.value = userid : uservalue.FireEvent("onblur")
					wend
					WebBrowser.document.getelementbyid(searchButton).click
					dim findIDLoop
					do while WebBrowser.visible =true 'wait for id search window disappear'
						WScript.Sleep 200 : findIDLoop = findIDLoop+1
						if err.number <> 0 then
							Err.Clear :  exit do
						end if
						if findIDLoop > 50 then
							OutputErrorID(userid) : WebBrowser.quit : isErrorIDFound = "true" : exit Sub
						end if
					loop
					exit do
				End If
			End If
		Next
		Set tempwins = Nothing :	Set winsWindows = Nothing
	loop
	on error goto 0
	isErrorIDFound = "false"
end Sub
Sub validUser(userid)
	userid=UCase(userid)
	dim validUsernum,toBeSearchedID,searchButton
	if isempty (toBeRevokedGroup) then
		toBeSearchedID = "USER_ID" : searchButton = "IM_USER_ID"
	else
		toBeSearchedID = "USR_GRP_ID" : searchButton = "IM_USR_GRP_ID"
	end if

	Do While ie.Busy Or ie.ReadyState <> 4: WScript.Sleep 200: Loop
	on error resume next
	Set TabPageContent = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow
	Set SearchUserID= TabPageContent.document.getelementbyid(toBeSearchedID)
	while SearchUserID Is Nothing
		Wscript.Sleep 200
		Set SearchUserID= TabPageContent.document.getelementbyid(toBeSearchedID)
	wend	
	while SearchUserID.value <> userid
		on error resume next '异常处理'
		ie.document.frames(0).document.getelementbyid("tabPage").contentWindow.document.getelementbyid(searchButton).click
		while err.number <> 0 
			Err.Clear : WScript.Sleep 200
			ie.document.frames(0).document.getelementbyid("tabPage").contentWindow.document.getelementbyid(searchButton).click
		wend
		on error goto 0
		EnterUserID(userid) : validUsernum = validUsernum + 1
		if isErrorIDFound = "false" then
			Set TabPageContent = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow
			while TabPageContent Is Nothing
				Wscript.Sleep 200
				Set TabPageContent = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow
			wend	
			Set SearchUserID= TabPageContent.document.getelementbyid(toBeSearchedID)
			while SearchUserID Is Nothing
				Wscript.Sleep 200
				Set SearchUserID= TabPageContent.document.getelementbyid(toBeSearchedID)
			wend
		else
			exit Sub
		end if
		if validUsernum >1 then
			isErrorIDFound = "true" : OutputErrorID(userid)  : exit Sub
		end if
	wend
	Do While ie.Busy Or ie.ReadyState <> 4: WScript.Sleep 200: Loop
	on error goto 0
end Sub
Sub GetMoreVlues(pageID)
	Set GetMore= LocatePageID(pageID).document.getelementbyid("getMore")
	if Not(GetMore Is Nothing) Then 
		GetMore.click : 	WScript.Sleep 2000
	end if
end Sub
Function LocatePageID(pageID)
	Set LocatePageID = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow.document.getelementbyid(pageID).contentWindow
	while LocatePageID Is Nothing
		Wscript.Sleep 200 : Set LocatePageID = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow.document.getelementbyid(pageID).contentWindow
	wend
end Function
Sub GetEndUserSaleList()
	Set AllCharacteristics= LocatePageID("USER_CHAR_GRID").document.getelementsbytagname("select")
	EndUserSalesNum = 0 : EndUserSaleList="" : EndUserValuedCharsNum=0
	for each item in AllCharacteristics
		if len(item.value) > 2 then
			if item.value = "SALCHN" then
				slaeValueID = "USER_CHAR:" & Mid(item.id,11,1) & "$CHAR_VAL"
				EndUserSaleList = userCharGridContent.document.getelementbyid(slaeValueID).value & ";" & EndUserSaleList
				EndUserSalesNum = EndUserSalesNum +1
			end if
			EndUserValuedCharsNum = EndUserValuedCharsNum + 1
			lastCharValue = userCharGridContent.document.getelementbyid("USER_CHAR:0$CHAR_TYPE_CD").value
		end if
	next
end Sub
Sub UpdatePortalsProfile(ModelUserPPUI)
	Do While ie.Busy Or ie.ReadyState <> 4: WScript.Sleep 500: Loop
	Set TabPageContent = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow
	while TabPageContent Is Nothing
		WScript.Sleep 200 : Set TabPageContent = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow
	wend
	Set EndUserPPUI = TabPageContent.document.getelementbyid("PORTAL_OVRD_USER")
	Set UserTypeFlg = TabPageContent.document.getelementbyid("USER_TYPE_FLG")
	if ModelUserPPUI <> "" and ModelUserPPUI <> "PORTAL" then
		if EndUserPPUI.value <> ModelUserPPUI then 
			UserTypeFlg.value="TMPL" : UserTypeFlg.FireEvent("onchange"): WScript.Sleep 1500
			UserTypeFlg.value="" : UserTypeFlg.FireEvent("onchange"): WScript.Sleep 1500	
			EndUserPPUI.value=ModelUserPPUI: EndUserPPUI.FireEvent("onblur") : WScript.Sleep 1500
		end if
	elseif EndUserPPUI.value = "PORTAL" then
		if UserTypeFlg.value <> "" then
			UserTypeFlg.value="TMPL" : UserTypeFlg.FireEvent("onchange"): WScript.Sleep 1500
			UserTypeFlg.value="" : UserTypeFlg.FireEvent("onchange"): WScript.Sleep 1500
		end if
	end if
end Sub
Sub AddSalesList(EndUserSaleList,ModelUserSaleList)
	Set Characteristics= LocatePageID("USER_CHAR_GRID").document.getelementsbytagname("select")
	if EndUserSaleList="" then '<------- add all model sales if end user doesn't have any one
		dim lastCharID 
		dim startNum ,loopnum'<------------------- check if the end user has other chars value except sales list
		if len(lastCharValue) > 2 then '<-----------------从最后一个char开始++'
			startNum = EndUserValuedCharsNum
			loopnum=0
			lastCharID= "IM_USER_CHAR:"&(EndUserValuedCharsNum -1)&"$ADD"
		else'<-----------------------------------------------从第一个char开始++'
			startNum = 0
			loopnum=1
			lastCharID= "IM_USER_CHAR:0$ADD"
		end if
		for num = loopnum to  UBound (ModelUserSaleList)
			Set TabPageContent = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow
			while TabPageContent IS Nothing
				WScript.Sleep 500 : Set TabPageContent = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow
			wend
			Set userCharGridContent = TabPageContent.document.getelementbyid("USER_CHAR_GRID").contentWindow
			while userCharGridContent IS Nothing
				WScript.Sleep 500 : Set userCharGridContent = TabPageContent.document.getelementbyid("USER_CHAR_GRID").contentWindow
			wend
			REM Set CharAdd = userCharGridContent.document.getelementbyid(lastCharID)
			Set CharAdd = LocatePageID("USER_CHAR_GRID").document.getelementbyid(lastCharID)
			while CharAdd IS Nothing
				REM WScript.Sleep 500 : Set CharAdd = userCharGridContent.document.getelementbyid(lastCharID)
				WScript.Sleep 500 : Set CharAdd = LocatePageID("USER_CHAR_GRID").document.getelementbyid(lastCharID)
			wend
			on error resume next
			CharAdd.click
			while Err.number <> 0 
				Err.Clear : WScript.Sleep 500 : CharAdd.click
			wend
			on error goto 0
			WScript.Sleep 1500 
		next
		for num = 0 to UBound(ModelUserSaleList)
			charTypeID ="USER_CHAR:" & startNum & "$CHAR_TYPE_CD"
			SeqID ="USER_CHAR:" & startNum & "$SEQ_NUM"
			charValueID ="USER_CHAR:" & startNum & "$CHAR_VAL"
			REM Set charType = userCharGridContent.document.getelementbyid(charTypeID)
			Set charType = LocatePageID("USER_CHAR_GRID").document.getelementbyid(charTypeID)
			while charType IS Nothing
				REM WScript.Sleep 500 : Set charType = userCharGridContent.document.getelementbyid(charTypeID)
				WScript.Sleep 500 : Set charType = LocatePageID("USER_CHAR_GRID").document.getelementbyid(charTypeID)
			wend
			REM Set Seq = userCharGridContent.document.getelementbyid(SeqID)
			REM Set charValue = userCharGridContent.document.getelementbyid(charValueID)
			Set Seq = LocatePageID("USER_CHAR_GRID").document.getelementbyid(SeqID)
			Set charValue = LocatePageID("USER_CHAR_GRID").document.getelementbyid(charValueID)
			
			charType.focus : charType.value="SALCHN" : charType.FireEvent("onchange")
			WScript.Sleep 1500 : Seq.focus : Seq.value=num + 1 : Seq.FireEvent("onblur")
			charValue.focus : charValue.value=ModelUserSaleList(num)  : charValue.FireEvent("onblur") : WScript.Sleep 1500
			startNum = startNum + 1
		next
	else '<--------------- process when then end user already has sales list'
		Set regEx = New RegExp
		lastnum = EndUserValuedCharsNum
		REM enduserlastsalenum = 
		for num = 0 to UBound(ModelUserSaleList)
			str=ModelUserSaleList(num) & ";" : regEx.Pattern = str
			regEx.Global = True : res = regEx.Test(EndUserSaleList)
			if res = "False" then '<--------------------- process when  the "to be added sale" is not found in end user sales list'
				REM Set TabPageContent = ie.document.frames(0).document.getelementbyid("tabPage").contentWindow
				REM Set userCharGridContent = TabPageContent.document.getelementbyid("USER_CHAR_GRID").contentWindow
				REM Set CharAdd= userCharGridContent.document.getelementbyid("IM_USER_CHAR:" & (lastnum-1) &"$ADD") : CharAdd.click
				Set CharAdd= LocatePageID("USER_CHAR_GRID").document.getelementbyid("IM_USER_CHAR:" & (lastnum-1) &"$ADD") : CharAdd.click
				
				charTypeID ="USER_CHAR:" & lastnum & "$CHAR_TYPE_CD"
				SeqID ="USER_CHAR:" & lastnum & "$SEQ_NUM"
				charValueID ="USER_CHAR:" & lastnum& "$CHAR_VAL"
				
				REM Set charType = userCharGridContent.document.getelementbyid(charTypeID)
				Set charType = LocatePageID("USER_CHAR_GRID").document.getelementbyid(charTypeID)
				while charType IS Nothing
					REM WScript.Sleep 500 : Set charType = userCharGridContent.document.getelementbyid(charTypeID)
					WScript.Sleep 500 : Set charType = LocatePageID("USER_CHAR_GRID").document.getelementbyid(charTypeID)
				wend
				REM Set Seq = userCharGridContent.document.getelementbyid(SeqID)
				REM Set charValue = userCharGridContent.document.getelementbyid(charValueID)
				Set Seq = LocatePageID("USER_CHAR_GRID").document.getelementbyid(SeqID)
				Set charValue = LocatePageID("USER_CHAR_GRID").document.getelementbyid(charValueID)
				
				charType.focus 
				on error resume next
				while Err.number <> 0 
					Err.Clear : WScript.Sleep 500 : charType.focus 
				wend
				on error goto 0
				
				charType.value="SALCHN" : charType.FireEvent("onchange")
				WScript.Sleep 1500 
				Seq.focus
				on error resume next
				while Err.number <> 0 
					Err.Clear : WScript.Sleep 500 : Seq.focus 
				wend
				on error goto 0
				
				Seq.value=EndUserSalesNum + 1 : Seq.FireEvent("onblur")
				charValue.focus : charValue.value=ModelUserSaleList(num)  : charValue.FireEvent("onblur") : WScript.Sleep 1500
				lastnum = lastnum + 1
			end if
		next
	end if
end Sub
Sub SetProdIE()
	on error resume next
	do
		WScript.Sleep 200 : Set tempwins=createobject("shell.application") : Set winsWindows = tempwins.Windows
		For Each WebBrowser In winsWindows
			If Instr(WebBrowser.LocationURL,"xxxxx") =1 or Instr(WebBrowser.LocationURL,"xxxxx") =1 Then
				Set ie=WebBrowser
				exit do
			End If
		Next 
		Set tempwins = Nothing :	Set winsWindows = Nothing
	loop
	on error goto 0
end Sub
Sub LoadFile(ArrayList)
	REM WshShell.run "C1Inputs.txt",1,true
	set fso=createobject("scripting.filesystemobject")
	set file=fso.opentextfile("C1Inputs.txt")
	Do Until file.AtEndOfStream
		ReDim Preserve ArrayList(txtnum)
		ArrayList(txtnum) = Trim(file.ReadLine)
		str = Trim(ArrayList(txtnum))
		txtnum = txtnum +1 
	Loop 
	file.Close : set fso = nothing : set file=nothing
	if isempty(str) then
		msgbox "No valid value is provided" : Wscript.Quit
	end if	
end Sub
Sub OutputErrorID(errorID)
	set fso = createobject("scripting.filesystemobject")
	set file = fso.OpenTextFile("errorID.txt", 8, True)
	file.WriteLine(errorID)
	file.Close : set file = nothing : set fso = nothing
end Sub
Sub FindC1EnvInIE(url)
	Set wins=createobject("shell.application")
	Set winsWindows = wins.Windows
	For Each WebBrowser In winsWindows
		If WebBrowser.visible =true and WebBrowser.Name="Internet Explorer" then
			Set ie=WebBrowser
			If Instr(WebBrowser.LocationURL,url) =1 Then
				Set ie=WebBrowser
				exit for
			end if
		end if
	next
	Set wins=nothing : Set winsWindows=nothing
	if typename(ie) = "Empty" then
		LogonEnv : SwitchMenu
	else 
		if ie.LocationURL <> url then
			LogonEnv : SwitchMenu
		end if
	end if
end Sub
Sub CheckPageExpire(tabName,toBeSearchedID)
	For each item in ie.document.frames(0).document.getelementbyid("tabMenu").contentWindow.document.getelementsbytagname("td")
		If item.InnerHTML = tabName Then 
			item.click
		Exit For
		End If
	Next
	Set SearchUserID= ie.document.frames(0).document.getelementbyid("tabPage").contentWindow.document.getelementbyid(toBeSearchedID)
	if SearchUserID Is Nothing then
		LogonEnv : SwitchMenu()
	end if
end Sub
Function getInputList(inputpage)
	set getInputList = LocatePageID(inputpage).document.getelementsbytagname("input")
end Function

Dim ie,num,UserIDDetail,UserDetail(),EndUserTodoList,ModelUserTodoNum,ModelUserTodoList(),TxtTodoList(),lastnum,winstr,EndUserGroupNum,EndUserGroupList,ModelUserGroupNum,ModelUserGroupList(),ModelUserGroupExpNum,ModelUserGroupExpList(),ModelUserSaleNum,ModelUserSaleList(),EndUserSaleList,EndUserPPUI,ModelUserPPUI,UserIDList(),isErrorIDFound,lastCharValue,EndUserValuedCharsNum,EndUserSalesNum,C1EnvsList(),C1URL,toBeRevokedGroup,TDList,GroupMemberList,InputTodoList

ReDim Preserve ModelUserSaleList(0)
ModelUserSaleList(0) = "NoDataHere"
const C1Name="xxxxx"
const C1Password="xxxxx"
CurrentDate=Day(Now)&"-"&Month(Now)&"-"&Year(Now)
isErrorIDFound = "false"

Set WshShell = WScript.CreateObject("WScript.Shell")
